#ifndef SCREENSHOTSWIDGET_H
#define SCREENSHOTSWIDGET_H

#include <QWidget>
#include <QPixmap>
#include <QPaintEvent>
#include <QPoint>

class ScreenshotsWidget : public QWidget
{
    Q_OBJECT
private:
    QPoint startPos;
    QPoint endPos;
    QPixmap originalPixmap;
    QPixmap subPixmap;
protected:
    void paintEvent(QPaintEvent *event);
    void mousePressEvent(QMouseEvent *event);
    void mouseReleaseEvent(QMouseEvent *event);
    void mouseMoveEvent(QMouseEvent *event);
signals:
    void ScreenShotFinishSignal(QPixmap pixmap);

public:
    explicit ScreenshotsWidget(QWidget *parent = nullptr);
    QPixmap GetPixmap(void);

public slots:
    void LoadPixmapSlot();

};

#endif // SCREENSHOTSWIDGET_H
